<html>
  <head>
    <link rel="stylesheet" type="text/css" href="sandbox.css">
    <title>iRING Sandbox</title>
    <script type="text/javascript">
      function updateForm()
      {
        var isUpdateQuery = document.getElementById("queryType").checked;
        
        if (isUpdateQuery)
        {
          document.getElementById("queryForm").enctype = "multipart/form-data";
          document.getElementById("queryForm").encoding = "multipart/form-data";
          document.getElementById("textArea").name = "update";
        }
        else
        {
          document.getElementById("queryForm").enctype = "application/x-www-form-urlencoded";
          document.getElementById("queryForm").encoding = "application/x-www-form-urlencoded";
          document.getElementById("textArea").name = "query";
        }
      }
    </script>
  </head>
  <body>
    <div class="banner">
      <img alt="iRING" src="iRING.gif">
    </div>
    <div class="main">
      <h1>
        Sandbox Service
      </h1>
      <br>
      <p>
        This service provides <a href="http://www.w3.org/TR/rdf-sparql-protocol/">SPARQL Protocol</a> access to a triple store containing <a href="https://www.posccaesar.org/wiki/ISO15926">ISO 15926</a> reference data.
      <p>
      <br>
      <p>
        See the <a href="http://www.w3.org/TR/rdf-sparql-protocol/#ap">SPARQL Protocol Specification</a> for details on caling the service over <a href="http://www.w3.org/TR/soap/">SOAP</a> and <a href="http://www.w3.org/Protocols/">HTTP</a>.
      <p>
      <br>
      <p>
        The form below can be used to test <a href="http://www.w3.org/TR/rdf-sparql-query/">SPARQL queries</a> against the triple store.
      <p>
    </div>
    <div class="queryTypeSwitcher">
      <p>Update Query: <input id="queryType" type="checkbox">
    </div>
    <form id="queryForm" action="sandbox" enctype="application/x-www-form-urlencoded" method="post" onsubmit="return updateForm();">
      <input type="hidden" name="outputMimeType" value="text/html">
      <input type="hidden" name="stylesheet" size="25" value="/xml-to-html.xsl">
      <textarea id="textArea" name="query" rows="10" cols="80">
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT * WHERE {
  ?s ?p ?o .
}
LIMIT 10
      </textarea>
      <input class="button" type="submit" value="Execute Query"/>
    </form>
    <!--<form id="uploadForm" action="/sandbox" enctype="multipart/form-data" method="post">
      <input type="file" name="update" size="70"/><input class="button" type="submit" value="Upload RDF"/>
    </form>-->
  </body>
</html>